package org.example.fallback;

import org.example.domain.User;
import org.example.feignclients.UserFeignClient;
import org.springframework.stereotype.Component;

//托底类：一定要去实现 Feign接口
@Component
public class UserFeignClientFallback implements UserFeignClient{

    //拖地方法
    @Override
    public User getUserById(Long id) {
        return new User(-1L,"此人不存在","服务不可用");
    }
}
